package yby.jdbc;

public class AppTest {
    public static void main(String[] args) throws Exception {
        int i=0;
        i=JdbcUtils.update("INSERT INTO `user` (username,`password`) VALUES('neo',MD5('123'))");
        if(i>0){
            System.out.println("插入成功！");
        }

        i=JdbcUtils.update("UPDATE `user` SET `password` =MD5('666') WHERE id=4");
        if(i>0){
            System.out.println("修改成功！");
        }

        i=JdbcUtils.update("DELETE FROM `user` WHERE id=3");
        if(i>0){
            System.out.println("删除成功！");
        }
        JdbcUtils.select("SELECT id,username FROM `user` ORDER BY id");
    }
}
